import React, { Component } from 'react'
import Header from '../../components/Header/Header'
import OrderItem from '../../components/OrderItem/OrderItem'
import PayWay from '../../components/PayWay/PayWay'
import PayButton from '../../components/PayButton/PayButton'

import styles from './WaitPay.module.less'

import Img1 from '../../img/ice1.png'
import Img2 from '../../img/ice2.png'

class WaitPay extends Component {
    constructor(props) {
        super(props)
        // 订单数据
        this.state = {
            totalPrice: '28.00',
            orderList: [{
                id: 1,
                img: Img1,
                goodName: '草莓腰果味冰淇淋',
                num: 1,
                price: 11
            }, {
                id: 2,
                img: Img2,
                goodName: '蓝莓腰果味冰淇淋',
                num: 1,
                price: 12
            }]
        }
    }
    render() {
        let { totalPrice, orderList } = this.state;
        return (
            <div className={styles.container}>
                <Header title="全部订单" />
                <div className={styles.itemWrap}>
                    <OrderItem orderList={orderList} />
                </div>
                <PayWay />
                <PayButton totalPrice={totalPrice} />
            </div >
        )
    }
}

export default WaitPay

